package com.ray.ioc.base;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;

import com.ray.ioc.core.IOCLayoutInflater;

/**
 * Created by Ray on 2015/9/11.
 */
public class IOCBaseActivity extends Activity implements View.OnClickListener{

    protected void onCreate(Bundle savedInstanceState,IOCBaseActivity baseActivity,int layoutId) {
        super.onCreate(savedInstanceState);

        IOCLayoutInflater inflater = new IOCLayoutInflater(getLayoutInflater(),this,baseActivity);
        View view = inflater.inflate(layoutId,null);
        setContentView(view);
    }

    @Override
    final public void onClick(View v) {
        v.setEnabled(false);
        click(v);
        v.setEnabled(true);
    }

    protected void click(View v){

    }
}
